<!DOCTYPE html>
<html>
<head>
  <title>AES Jobs</title>
  <%= stylesheet_link_tag    "application" %>

  <%= csrf_meta_tags %>
  <style>
      .heading {
          width: 300px;
          padding: 15px;
          border: 5px solid navy;
          margin: 5px;
          background: -webkit-linear-gradient(left, white , #CCFFFF); /* For Safari 5.1 to 6.0 */
          background: -o-linear-gradient(right, white, #CCFFFF); /* For Opera 11.1 to 12.0 */
          background: -moz-linear-gradient(right, white, #CCFFFF); /* For Firefox 3.6 to 15 */
          background: linear-gradient(to right, white , #CCFFFF); /* Standard syntax (must be last) */


          box-shadow: 10px 10px 5px #888888;
          border: 1px solid #478c7c;

          -moz-border-radius-bottomleft: 25px;
          -webkit-border-bottom-left-radius: 25px;
          border-bottom-left-radius: 25px;

          -moz-border-radius-bottomright: 25px;
          -webkit-border-bottom-right-radius: 25px;
          border-bottom-right-radius: 25px;

          -moz-border-radius-topright: 25px;
          -webkit-border-top-right-radius: 25px;
          border-top-right-radius: 25px;

          -moz-border-radius-topleft: 25px;
          -webkit-border-top-left-radius: 25px;
          border-top-left-radius: 25px;

      }
  </style>
</head>
<body>

<!-- 0 = Applicant
     1 = Hiring Specialist
     2 = Staffing Expert
     3 = Hiring Manager
     4 = Store Manager
     5 = Tech Support   -->

<div id="nav" style="width:95%" class="heading">
  <% if current_user %>
      <font color="green"><%= current_user['email'] %></font>
      <%= link_to "Edit Profile", edit_user_path(current_user.id)%>&nbsp;&nbsp;&nbsp;&nbsp;
      <%= link_to "Logout", :logout, method: :post %>&nbsp;&nbsp;&nbsp;&nbsp;
      <%= link_to "Apply", applicant_home_path%>&nbsp;&nbsp;&nbsp;&nbsp;
      <% if session[:permission].to_i > 0 %>
          <%= link_to "Hiring Specialist", hiring_specialist_home_path%>&nbsp;&nbsp;&nbsp;&nbsp;
      <% end %>
      <% if session[:permission].to_i > 1 %>
          <%= link_to "Staffing Expert", staffing_expert_home_path%>&nbsp;&nbsp;&nbsp;&nbsp;
      <% end %>
    <% if session[:permission].to_i > 2 %>
        <%= link_to "Hiring Manager", hiring_manager_home_path%>&nbsp;&nbsp;&nbsp;&nbsp;
    <% end %>
      <% if session[:permission].to_i > 3 %>
          <%= link_to "Store Manager", store_manager_home_path%>&nbsp;&nbsp;&nbsp;&nbsp;
      <% end %>
      <% if session[:permission].to_i > 4 %>
          <a href="javascript:window.open('http://140.211.68.130/view/techs/users.php','User Permissions','width=500,height=150')">Permissions</a>&nbsp;&nbsp;&nbsp;&nbsp;
          <%= link_to "Users", users_path%>&nbsp;&nbsp;&nbsp;&nbsp;
      <% end %>
  <% else %>
      <%= link_to "Register", new_user_path %> |
      <%= link_to "Login", :login %>
  <% end %>
</div>
  <p id="notice"><%= flash[:notice] %></p>
  <p id="alert"><%= flash[:alert] %></p>
<%= yield %>

</body>
</html>